package com.zzb.controller;

import com.zzb.DTO.ResultDTO;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author ASUS
 */
@RestControllerAdvice
public class ExceptionController {

    @ExceptionHandler
    public ResultDTO myExceptionHandler(Exception e){
        return new ResultDTO(500,e.getMessage(),-1,null);
    }
}
